package com.information.manage.basic.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.information.manage.basic.model.entity.DictionaryInfoDO;
import com.information.manage.basic.model.query.AddDictionaryInfoQuery;
import com.information.manage.basic.model.query.UpdateDictionaryInfoQuery;
import com.information.manage.basic.model.vo.DictionaryInfoListVO;
import com.information.manage.basic.common.result.Result;

import java.util.List;

public interface DictionaryInfoService extends IService<DictionaryInfoDO> {

    /**
     * 新增字典项
     * @param addDictionaryInfoQuery
     * @return 字典项id
     */
    Result<Integer> addDictionaryInfo(AddDictionaryInfoQuery addDictionaryInfoQuery);

    /**
     * 修改字典项
     * @param updateDictionaryInfoQuery
     * @return
     */
    Result<Boolean> updateDictionaryInfo(UpdateDictionaryInfoQuery updateDictionaryInfoQuery);

    /**
     * 移动字典项
     * @param id 字典项id
     * @param up 是否上移 上 true / 下 false
     * @return
     */
    Boolean moveDictionaryInfo(Integer id, Boolean up);

    /**
     * 删除字典项
     * @param ids 字典项id
     * @return
     */
    Result<Boolean> deleteDictionaryInfo(List<Integer> ids);

    /**
     * 根据类型id查询字典项
     * @param categoryId 字典类型id
     * @return
     */
    List<DictionaryInfoListVO> queryListByCategoryId(Integer categoryId);

}
